<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
       <h1>{{dollar|toRMB}}</h1>
       <!-- 局部过滤器：表示dollar经过toRMB经行过滤 -->
    </div>
</body>
<script>
    const app = new Vue({
        el:'#app',
        data:{
           msg:'李白',
           dollar:100
        },
        filters:{ //一个局部过滤器 ，这个filter要加s,
            toRMB(input){
                console.log(input); //打印的结果是100
                return input*6.65
            }
        }
    })
</script>
</html>